/*二维数组赋值 */
public class example4_3 {
    public static void main(String[] args) {
        int D[][] = new int[4][5];
        int i, j, k = 0;
        for (i = 0; i < 4; i++) {
            for (j = 0; j < 5; j++) {
                D[i][j] = k;
                k++;
            }
        }
        // 给二维数组赋值

        for (i = 0; i < 4; i++) {
            for (j = 0; j < 5; j++) {
                System.out.println(D[i][j] + " ");
                System.out.println();
            }
        }

    }

}
